FROM registry.cn-hangzhou.aliyuncs.com/xiaoyilin/temurin-jdk:8.472-d131slim
LABEL xiaoyilin=406735078@qq.com
RUN sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list.d/debian.sources  && \
apt-get update && apt-get install -y curl rlwrap ca-certificates && \
curl -O https://download.clojure.org/install/linux-install-1.12.3.1577.sh && \
chmod +x linux-install-1.12.3.1577.sh && \
./linux-install-1.12.3.1577.sh && \
touch /etc/man_db.conf && echo "MANPATH_MAP /usr/local/clojure/bin /usr/local/clojure/man" > /etc/man_db.conf && \
apt-get  purge -y curl ca-certificates && \
apt-get autoremove -y && apt autoclean
CMD ["clojure","--version"]

# docker build -t registry.cn-hangzhou.aliyuncs.com/xiaoyilin/clojure:1.12.3.1577 .
# docker run --rm registry.cn-hangzhou.aliyuncs.com/xiaoyilin/clojure:1.12.3.1577
# docker push registry.cn-hangzhou.aliyuncs.com/xiaoyilin/clojure:1.12.3.1577

# 使用linux安装脚本将创建可执行文件/usr/local/bin/clj、/usr/local.bin/clojure和目录/usr/local/lib/clojure
# 安装到指定位置./linux-install.sh --prefix /opt/infrastructure/clojure
#最低运行时依赖性Java 8
#支持LTS（长期支持）版本，目前为Java 8、Java 11、Java 17、Java 21
# https://adoptium.net/zh-CN/installation/linux/
# https://github.com/clojure/brew-install/releases
# https://clojure.org/guides/install_clojure